define([ "ng", "common/js/user-module", "common/js/util-module", "ui.router" ],
		function(angular) {
			var app = angular.module("AuthApp", [ "UserModule", "UtilModule",
					"ui.router" ]);
			app.config(function($stateProvider, $urlRouterProvider) {
				return $stateProvider.state("supadmin", {
					"url" : "/supadmin",
					"controller" : function($scope, epModal) {
						$scope.$parent.loginInfo.role = "SUPADMIN";
						return epModal.open("login");
					}
				});
			});
			{
				app.controller("AuthCtrl",
						function($scope, User, $window,  $http, epModal) {
							$scope.roles = [ "COORDINADOR", "SECRETARIO", "PROFESOR",
									"ACUDIENTE" ];
							$scope.loginInfo = {};
							$scope.logIn = function() {
								return User.login({}, $scope.loginInfo, function() {
									return $window.location.href = "/";
								}, function(error) {
									return epModal.notify(error.data, "error", "center");
								});
							};
							$scope.asd = function() {
								User.test({},{id:1,nombre:"JAJAJA"});
							}
						});
			}
			;
		})
window.define(["ng", "common/js/user-module", "common/js/util-module", "ui.router"], function (angular) {
    var app = angular.module("AuthApp", ["UserModule", "UtilModule", "ui.router"]);
    app.config(function ($stateProvider, $urlRouterProvider) {
        return $stateProvider.state("supadmin", {
          "url": "/supadmin",
          "controller": function ($scope, epModal) {
            var loginInfo = $scope.$parent.loginInfo;
            loginInfo.role = users.Role.valueOf("SUPADMIN");
            return epModal.open("login");
          }
        });
      });
    return app.controller("AuthCtrl", function ($scope, User, $window, $parse, $http, epModal) {
        $scope.roles = ["COORDINADOR", "SECRETARIO", "PROFESOR", "ACUDIENTE"];
        User.getCalificacionesPeriodo({
          "idMateria": 1,
          "idCurso": 1
        });
        $scope.loginInfo = {};
        return $scope.logIn = function () {};
      });
  })